<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>认证中心</title>
</head>
<div style="text-align: center;">这里是认证中心主页</div>
<body>
    <div style="align-content: center">当前登录用户：<span id="loginStatus"></span></div>


<link th:href="@{favicon.ico}" rel="shortcut icon"/>
<script th:src="@{/js/main.js}"></script>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/Base64/1.0.2/base64.js"></script>
<script>
    var token = localStorage.getItem("token");
    alert("token:" + token);
    if(token!=null){
        var info = token.split(".")[1];
        var userName = JSON.parse(window.atob(info)).name;
        $('#loginStatus').text(userName);
    }
</script>
</body>
</html>